import { staticPath, productInfo } from '@/config/config';

const state = {
  // 当前播放音频id
  currAudio: '',
  // 是否有音频功能
  hasAudio: false,
  // 是否为 分销版本同步小学课堂
  isWx: false,
  // 当前活动tab
  activeTab: 1,

  // 上次自动更新缓存时间
  updateTime: 0,
  // 自动更新间隔ms 3小时
  autoUpdateTime: 3 * 60 * 60 * 1000,
  // 首页所有课程列表 _学段id_学科id_年级id: {},
  allCourse: {},

  // 是否正在登录
  isLogin: false,
  // 禁用渠道
  disChannel: [74],
  // 微信授权登录后跳转链接
  loginThenPath: '',
  // 词典xtoken
  xToken: {},
  // 词典历史
  dicHistory: [],
  // 用户信息
  userInfo: {},
  // 用户微信信息
  wxUserInfo: {},
  // 是否为返回页面
  isBack: false,
  // 应用列表
  appList: [
    {
      title: '幼儿中小学专题全覆盖', // 应用分类名称
      list: [
        // 当前分类下应用列表
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.iexuetang', // 应用链接
          apkLink: '', // 应用下载链接
          desc: '中小学英语数学语文名师同步辅导视频', // 应用说明
          name: '格灵课堂', // 应用名称
          icon: require('../images/pay/gelingketang.png'), // 应用图标
          pid: 13 // 应用产品id
        }
      ]
    },
    {
      title: '中小学同步',
      list: [
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.zxxtb',
          apkLink: '',
          desc: '中小学英语数学语文名师同步辅导视频',
          name: '中小学辅导班',
          icon: require('../images/pay/fudaoban.png'),
          pid: 9
        },
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.xxtb',
          apkLink: '',
          desc: '小学英语数学语文名师同步辅导视频',
          sortDesc: '小学语数英名师同步辅导',
          name: '同步小学课堂',
          icon: require('../images/pay/tongbuxiaoxue.png'),
          pid: 1
        },
        {
          link:
            'https://android.myapp.com/myapp/detail.htm?apkName=com.wyt.iexuetang.hd.xxtb&ADTAG=mobile',
          apkLink: '',
          desc: '小学英语数学语文名师同步辅导视频',
          name: '小学名师课堂',
          icon: require('../images/pay/xiaoxuemingshiketang.png'),
          pid: 35,
          channel_id: 83,
          query: {
            open_type: 'link'
          }
        },
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.xxtb.one',
          apkLink: '',
          desc: '小学同步英语数学语文知识点微课',
          name: '同步小学一年级',
          icon: require('../images/pay/tongbuyi.png'),
          pid: 3
        },
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.xxtb.two',
          apkLink: '',
          desc: '小学同步英语数学语文知识点微课',
          name: '同步小学二年级',
          icon: require('../images/pay/tongbuer.png'),
          pid: 4
        },
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.xxtb.san',
          apkLink: '',
          desc: '小学同步英语数学语文知识点微课',
          name: '同步小学三年级',
          icon: require('../images/pay/tongbusan.png'),
          pid: 5
        },
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.xxtb.four',
          apkLink: '',
          desc: '小学同步英语数学语文知识点微课',
          name: '同步小学四年级',
          icon: require('../images/pay/tongbusi.png'),
          pid: 6
        },
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.xxtb.five',
          apkLink: '',
          desc: '小学同步英语数学语文知识点微课',
          name: '同步小学五年级',
          icon: require('../images/pay/tongbuwu.png'),
          pid: 7
        },
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.xxtb.six',
          apkLink: '',
          desc: '小学同步英语数学语文知识点微课',
          name: '同步小学六年级',
          icon: require('../images/pay/tongbuliu.png'),
          pid: 8
        },
        {
          link:
            'https://a.app.qq.com/o/simple.jsp?pkgname=com.wyt.iexuetang.hd.xxwkt',
          apkLink: '',
          desc: '小学语文数学英语知识点微课辅导视频',
          name: '同步小学微课',
          icon: require('../images/pay/tongbuweike.png'),
          pid: 2
        }
      ]
    },
    {
      title: '幼儿早教',
      list: [
        {
          link:
            'https://android.myapp.com/myapp/detail.htm?apkName=com.wyt.iexuetang.hd.xqb',
          apkLink: '',
          desc: '宝贝故事国学儿歌安全亲子英语等动画教育启蒙视频',
          name: '幼儿早教',
          icon: require('../images/pay/youjiaoguan.png'),
          pid: 10
        },
        {
          link:
            'https://android.myapp.com/myapp/detail.htm?apkName=com.wyt.iexuetang.hd.gx',
          apkLink: '',
          desc: '弟子规三字经千字文百家姓论语等国学经典启蒙课程',
          name: '国学馆',
          icon: require('../images/pay/guoxueguan.png'),
          pid: 11
        },
        {
          link:
            'https://android.myapp.com/myapp/detail.htm?apkName=com.wyt.iexuetang.hd.gs',
          apkLink: '',
          desc: '儿童故事益智早教启蒙教育应用',
          name: '儿童故事城堡',
          icon: require('../images/pay/gushixiaowu.png'),
          pid: 12
        }
      ]
    },
    {
      title: '专题拓展',
      list: [
        {
          link:
            'https://android.myapp.com/myapp/detail.htm?apkName=com.wyt.iexuetang.hd.xxas',
          apkLink:
            'https://video.english163.com/iexue_pic/1xR3YG1547019313.apk',
          desc: '小学生思维认知训练基础',
          name: '小学科学奥数',
          icon: require('../images/pay/kexueaoshu.png'),
          pid: 14
        }
      ]
    }
  ],
  // 公众号信息
  productInfo,

  // 标签列表
  tagList: {
    section: 2, // 学段
    grade: '', // 年级
    subject: '', // 学科
    press: '' // 出版社
  },

  // 年级列表
  grades: [],
  // 首页当前选中年级
  currGrade: {},
  //学科
  xueKe: '',
  // 默认头像
  defaultIcon: 'https://www.iexue100.com/public/uploads/icon.png',
  // 静态资源路径
  staticPath,
  courseObj: {
    ch: {
      nianji_id: '', //语文年级id
      press_id: '' //语文出版社id
    },
    ma: {
      nianji_id: '', //数学年级id
      press_id: '' //数学出版社id
    },
    en: {
      nianji_id: '', //英语年级id
      press_id: '' //英语出版社id
    },
    si: {
      nianji_id: '', //科学年级id
      press_id: '' //科学出版社id
    }
  }
};

export default state;
